import 'package:childrenapp/buy.dart';
import 'package:childrenapp/home_page.dart';
import 'package:childrenapp/settlement.dart';
import 'package:flutter/material.dart';

import 'details.dart';
import 'favorite.dart';

class Page0 extends StatefulWidget {
  const Page0({super.key});

  @override
  State<Page0> createState() => _Page0State();
}

class _Page0State extends State<Page0> {
  @override
  Widget build(BuildContext context) {
    double screenWidth = MediaQuery.of(context).size.width;
    double screenHeight = MediaQuery.of(context).size.height;

    return Scaffold(
      body: Container(
        child: Stack(children: [
          Positioned(
            child: Container(
              alignment: Alignment.topCenter,
              height: screenHeight,
              child: const Image(
                  image: AssetImage(
                      'images/Image/ben-white-qDY9ahp0Mto-unsplash 1.png')),
            ),
          ),
          Positioned(
            bottom: 0,
            child: Container(
              width: screenWidth,
              height: 400,
              decoration: const BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(40),
                  topRight: Radius.circular(40),
                ),
              ),
              child: Container(
                child: Column(
                  children: [
                    Container(
                      margin: EdgeInsets.only(top: 20),
                      child: const Center(
                        child: Text(
                          'Best Quality For\n     Your Junior',
                          style: TextStyle(
                              fontSize: 44, fontWeight: FontWeight.w600),
                        ),
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: 20),
                      child: const Center(
                        child: Text(
                          'A Primium Online Store\n      For your Junuor.',
                          style: TextStyle(fontSize: 22, height: 1.5),
                        ),
                      ),
                    ),
                    Container(
                      height: 80,
                      width: 200,
                      margin: EdgeInsets.only(top: 30),
                      child: ElevatedButton(
                        onPressed: () {
                          Navigator.push(context,
                              MaterialPageRoute(builder: (context) {
                            return Home_Page();
                          }));
                        },
                        child: Text(
                          'Get Started',
                          style: TextStyle(fontSize: 22),
                        ),
                        style: ButtonStyle(
                          shape: MaterialStateProperty.all(
                              RoundedRectangleBorder(
                                  borderRadius: BorderRadius.circular(25))),
                          backgroundColor: MaterialStateProperty.all(
                            Color.fromRGBO(51, 51, 51, 1.0),
                          ),
                        ),
                      ),
                    )
                  ],
                ),
              ),
            ),
          )
        ]),
      ),
    );
  }
}
